﻿using Anke.SHManage.MSSQLDAL;
using Anke.SHManage.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Anke.SHManage.Model;
using Anke.SHManage.Model.BasicEventInfo;

namespace Anke.SHManage.BLL
{
    public class TaskBLL
    {
        private TaskDAL dal = new TaskDAL();

        //查询任务列表
        public object GetTaskList(int pageSize, int pageIndex, DateTime start, DateTime end, string center, string station, string actualNumber, string ambulanceNumber, string driver,
                                  string doctor, string nurse, string stretcher, string patientName, string callNumber, string contactTelephone, string localAddress, string sendAddress,
                                  E_StatisticsPermisson em, string selfWorkCode, string selfCenterID, string selfStationID, string eventDispatchCenterID)
        {
            return dal.GetTaskList(pageSize, pageIndex, start, end, center, station, actualNumber, ambulanceNumber, driver,
                                   doctor, nurse, stretcher, patientName, callNumber, contactTelephone, localAddress, sendAddress,
                                   em, selfWorkCode, selfCenterID, selfStationID, eventDispatchCenterID);
        }


        public bool UpdateTask(TaskAmbulanceInfo info, string operatorCode)
        {
            bool result = false;
            string re = dal.ModifyTask(info, operatorCode);
            result = re.Length == 0 ? true : false;
            return result;
        }
      public List<ModifyRecordInfo>  GetCrackInfos(int pageIndex, int pageSize, ref int rowCount, string TaskCode)
      {
         return dal.GetCrackInfos(pageIndex, pageSize, ref rowCount, TaskCode);
      }
         /// <summary>
        /// 根据工号查询人员信息
        /// </summary>
        /// <param name="workID"></param>
        /// <returns></returns>
        public PersonInfo GetPreson(string workID)
      {
          return dal.GetPreson(workID);
      }
    }
}
